{% extends "aside/erp/base.html" %}
{% load staticfiles %}
{% block custom_tdk %}
    <title>物流管理 - WanFeng</title>
    <meta name="description" content="物流管理">
{% endblock %}

{% block page-title %}燕文渠道设置{% endblock %}

{% block app-body %}

<div class="padding">
<div class="box">

<div class="row p-a">

    <div class="col-sm-6">
        <input id="filter" type="text" class="form-control inline m-r">
    </div>
    <div class="col-sm-6">
        <div class="row">
            <div class="col-sm-4">
                <button class="btn btn-fw dark text-white" data-toggle="modal" data-target="#modal-addChannel">添加物流渠道</button>
            </div>
            <div class="col-sm-8">
                <select class="custom-select" id="selectChannelType">
                    <option value="0">全部渠道</option>
                    <option value="1" selected>燕文线下渠道</option>
                    <option value="2">速卖通线上渠道</option>
                </select>
            </div>
        </div>

    </div>

</div>




<div>
    <table class="table m-b-none" data-ui-jp="footable" data-filter="#filter" data-page-size="20">
                            <thead>
                            <tr>
                                <th style="width:20px"></th>
                                <th data-toggle="true">展示名称（中/英）</th>
                                <th data-hide="phone">服务代码</th>
                                <th>是否启用</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody id="channelListBox">
                            {% for channel in channelData %}
                            <tr>
                                <td><label class="ui-check m-a-0">
                                    <input type="checkbox" name="post[]" value="{{ channel.ID }}">
                                    <i class="dark-white"></i></label></td>
                                <td>{{ channel.NAME }}</td>
                                <td>{% ifequal channel.SERVICENAME 'None'  %}-{% else %}{{ channel.SERVICENAME }}{% endifequal %}</td>
                                <td>
                                    <div class="col-sm-10"><label class="ui-switch danger m-t-xs m-r"><input type="checkbox" {% ifnotequal channel.enabled '0' %}checked="checked"{% endifnotequal %} class="has-value channelEnble" data-val="{{ channel.YWCHANNEL_ID }}" data-type="yanwen"> <i></i></label></div>
                                </td>
                                <td>
                                    <a href="javascript:;" class="text-info channelSettings" data-val="{{ channel.YWCHANNEL_ID }}" data-serviceName="{{ channel.NAME }}">设置</a>
                                </td>
                            </tr>
                            {% endfor %}
                            </tbody>
    <tfoot class="hide-if-no-paging"><tr><td colspan="5" class="text-center"><ul class="pagination"></ul></td></tr></tfoot>
                        </table>
</div>


<div id="modal-channelSettings" class="modal black-overlay" data-backdrop="false">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">物流承运商设置<span></span> <a data-dismiss="modal" class="pull-right text-muted text-lg p-a-sm m-r-sm">×</a></h5>

            </div>
            <div class="modal-bodyp-lg m-l-1 m-r-3 row p-a">
                <form role="">
                    <input type="hidden" id="logisticsChannelSetingsId" value="None"/>
                    <div class="form-group row">
                        <label for="channelDiyName" class="col-sm-2 form-control-label text-right">自 定 义 名 称:</label>
                        <div class="col-sm-9"><input type="text" class="form-control" id="channelDiyName"></div>
                    </div>
                    <div class="form-group row">
                        <label for="maxDeclareAmount" class="col-sm-2 form-control-label text-right">最大申报价值:</label>
                        <div class="col-sm-3">
                            <div class="input-group m-b"><span class="input-group-addon">$</span> <input type="text" class="form-control inputPrice" id="maxDeclareAmount"> </div>
                        </div>
                        <label for="maxDeclareAmount" class="col-sm-2 form-control-label text-right">打 单 类 型</label>
                        <div class="col-sm-4">
                            <select class="form-control" id="printStyle">
                                <option value="None">------ 请 选 择 ------</option>
                                <option value="A4L">A4L - 地址</option>
                                <option value="A4LI">A4LI - 地址+拣货单</option>
                                <option value="A4LC">A4LC - 地址+报关</option>
                                <option value="A4LCI">A4LCI - 地址+报关+拣货单</option>
                                <option value="A6L">A6L- 地址</option>
                                <option value="A6LI">A6LI - 地址+拣货单</option>
                                <option value="A6LC">A6LC - 地址+报关</option>
                                <option value="A6LCI">A6LCI - 地址+报关+拣货单</option>
                                <option value="A10x10L">A10x10L - 地址</option>
                                <option value="A10x10LI">A10x10LI - 地址+拣货单</option>
                                <option value="A10x10LC">A10x10LC  - 地址+报关</option>
                                <option value="A10x10LCI">A10x10LCI - 地址+报关+拣货单</option>
                            </select>
                        </div>
                    </div>
                    <div class="text-center">
                    <button class="btn btn-fw info" type="button" id="saveYWChannel">保存</button>
                </div>
                </form>
            </div>
            <div class="modal-footer">
                        <button type="button" class="btn dark p-x-md" data-dismiss="modal">关闭</button>
                    </div>

        </div>
    </div>
</div>

<footer class="light lt p-a">

</footer>
</div>
</div>


{% endblock %}